package com.csii.adhoc.dblink.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.csii.adhoc.dblink.DbLinkPo;

import java.util.List;

/**
 * @description: 数据连接接口类
 * @author: panChuanJiang
 * @create: 2021-01-13 09:32
 */
public interface DbLinkService {

    void insertOneDbLink(DbLinkPo dbLinkPo);

    void updateDbLinkByPrimaryKey(DbLinkPo dbLinkPo);

    void deleteDbLinkByPrimaryKey(String connId);

    IPage<DbLinkPo> selectPageDbLink(Page<DbLinkPo> page, DbLinkPo dbLinkPo);

    List<DbLinkPo> selectListDbLink(DbLinkPo dbLinkPo);

    DbLinkPo selectDbLinkByPrimaryKey(String connId);

    /**
     * 增、删、改、测试连接配置 按optMode区分接口
     *
     * @param dbLinkPo
     * @param optMode  A U D T
     */
    void dbLinkMaintain(DbLinkPo dbLinkPo, String optMode);
}
